export CUDA_VISIBLE_DEVICES=0
FLOWERS_DATA_DIR=~/18dshw/flowers-data/
cd inception
bazel build //inception:download_and_preprocess_flowers
bazel-bin/inception/download_and_preprocess_flowers "${FLOWERS_DATA_DIR}"

cd inception-v3/
wget http://download.tensorflow.org/models/image/imagenet/inception-v3-2016-03-01.tar.gz
tar xzf inception-v3-2016-03-01.tar.gz

bazel build //inception:flowers_train
MODEL_PATH=~/18dshw/inception-v3/inception-v3/model.ckpt-157585
FLOWERS_DATA_DIR=~/18dshw/flowers-data/
TRAIN_DIR=~/18dshw/flowers_train/
bazel-bin/inception/flowers_train --train_dir="${TRAIN_DIR}"   --data_dir="${FLOWERS_DATA_DIR}"   --pretrained_model_checkpoint_path="${MODEL_PATH}"   --fine_tune=True   --initial_learning_rate=0.001   --input_queue_memory_factor=1

bazel build //inception:flowers_eval
TRAIN_DIR=~/18dshw/flowers_train/
FLOWERS_DATA_DIR=~/18dshw/flowers-data/
EVAL_DIR=~/18dshw/flowers_eval/
bazel-bin/inception/flowers_eval --eval_dir="${EVAL_DIR}"   --data_dir="${FLOWERS_DATA_DIR}"   --subset=validation   --num_examples=500   --checkpoint_dir="${TRAIN_DIR}"   --input_queue_memory_factor=1   --run_once
